#ifndef LOCKFILE_H_
#define LOCKFILE_H_

#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <iostream>
#include <stdlib.h>
#include <sys/wait.h>
#include "../PlazaEstacionamiento.h"
using namespace std;

class LockFile {

private:

	struct flock fl;
	int fd;
	char nombre[255];

public:

	LockFile(char* nombre);
	virtual ~LockFile();

	int tomarLock(off_t start);
	int liberarLock(off_t start);
	int escribir(char* buffer, int buffsize);
};

#endif /* LOCKFILE_H_ */
